package com.fcscs.ecms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fcscs.cservice.domain.Restaurant;
import com.fcscs.cservice.domain.Versions;
import com.fcscs.cservice.domain.model.EntityVersionView;
import com.fcscs.cservice.domain.model.RestaurantView;
import com.fcscs.ecms.dao.ECMSRestaurantDao;
import com.fcscs.ecms.service.ECMSRestaurantManager;

@Service("ecmsRestaurantManager")
public class ECMSRestaurantManagerImpl implements ECMSRestaurantManager {

	@Autowired
	ECMSRestaurantDao restaDao;
	
	@Override
	public Restaurant getRestaurant(long id) {
		return restaDao.getRestaurant(id);
	}

	@Override
	public List<Restaurant> getRestaurantList(long orgId, long propId,boolean isCurrent) {
		return restaDao.getRestaurantList(orgId, propId, isCurrent);
	}

	@Override
	public List<Restaurant> getRestaurantList(long orgId, long propId,long versionId) {
		return restaDao.getRestaurantList(orgId, propId, versionId);
	}

	@Override
	public List<Restaurant> saveRestaurantList(List<Restaurant> restList) {
		return restaDao.saveRestaurantList(restList);
	}

	@Override
	public Restaurant createRestaurant(Restaurant rest) {
		return restaDao.createRestaurant(rest);
	}

	@Override
	public Restaurant saveRestaurant(Restaurant rest) {
		return restaDao.saveRestaurant(rest);
	}

	@Override
	public boolean deleteRestaurant(Restaurant rest) {
		return restaDao.deleteRestaurant(rest);
	}

	@Override
	public boolean permDeleteRestaurant(Restaurant rest) {
		return restaDao.permDeleteRestaurant(rest);
	}

	@Override
	public boolean isRestaurantTaken(long orgId, long propId, String name,Long id, long versionId) {
		return restaDao.isRestaurantTaken(orgId, propId, name, id, versionId);
	}

	@Override
	public List<RestaurantView> getRestaurantViewList(long orgId, long propId) {
		return restaDao.getRestaurantViewList(orgId, propId);
	}

	@Override
	public boolean copyVersion(Versions fromVer, Versions toVer) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public List<EntityVersionView> getEntityVersionViewList(long orgId,
			long propId) {
		// TODO Auto-generated method stub
		return null;
	}
}
